//
//  PartnerAPI.swift
//  LeGou
//
//  Created by lxm on 2022/8/18.
//
import Foundation

enum PartnerAPI {
    case apply(_ param : [String : Any])
    
    case info
}

extension PartnerAPI: ZMApiProvider {
    func BaseUrl() -> String {
        return baseUrl
    }
    
    func urlAndMthodAndParam() -> (url: String, method: ZMHTTPMethod, params: [String : Any], body: Bool) {
        switch self {
        case .apply(let pa):
            return ("/api/front/partner/apply", .post, pa, true)
        case .info:
            return ("/api/front/partner/getApplyStates", .get,[:], false)
        }
    }
    
    func HTTPHeader() -> ZMHTTPHeaders? {
        return AppHelper.reqeustHeader()
    }
    
    func UpLoadData() -> [Data]? {
        return nil
    }
    
    func ParamInBody() -> Bool {
        switch self {
//            return true
        default:
            return false
        }
    }
}
